<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="onlineusers">

  <div class="t"><div class="b"><div class="l"><div class="r"><div class="bl"><div class="br"><div class="tl"><div class="tr">

<table >
<tr><td class="body" colspan="2" style="padding-bottom:8px;">
<center><nobr>
<b><a href="/stats/publicSummary.aspx" class="black">
<xsl:value-of select="@totOnline"/> utenti online</a></b>
</nobr></center>
</td></tr>

<xsl:for-each select="freak/user">
  <xsl:if test="position() &lt; 11">

    <tr>
      <td style="border-bottom:1px dotted #d6c7a6;" class="body_10px">

        <!-- <tr><td class="nboxR"> -->
        <xsl:choose>
          <xsl:when test='floor( xmldatacache/extension/@uStatus div 32 ) mod 2'>
            <img src="/imgs/mela.gif"/>
          </xsl:when>
          <xsl:when test='floor( xmldatacache/extension/@uStatus div 16 ) mod 2 and (xmldatacache/extension/@sexid="24" or xmldatacache/extension/@sexid="26")'>
            <img src="/imgs/ananas_m.gif"/>
          </xsl:when>
          <xsl:when test='floor( xmldatacache/extension/@uStatus div 16 ) mod 2 and (xmldatacache/extension/@sexid="25" or xmldatacache/extension/@sexid="27")'>
            <img src="/imgs/ananas_f.gif"/>
          </xsl:when>
          <xsl:when test='xmldatacache/extension/@certified=1 and (xmldatacache/extension/@sexid="24" or xmldatacache/extension/@sexid="26")'>
            <img src="/imgs/symbol_mc.gif"/>
          </xsl:when>
          <xsl:when test='xmldatacache/extension/@certified=1 and (xmldatacache/extension/@sexid="25" or xmldatacache/extension/@sexid="27")'>
            <img src="/imgs/symbol_fc.gif"/>
          </xsl:when>
          <xsl:when test='xmldatacache/extension/@sexid="24" or xmldatacache/extension/@sexid="26"'>
            <img src="/imgs/symbol_m.gif"/>
          </xsl:when>
          <xsl:when test='xmldatacache/extension/@sexid="25" or xmldatacache/extension/@sexid="27"'>
            <img src="/imgs/symbol_f.gif"/>
          </xsl:when>
        </xsl:choose>
        &#160;
        <xsl:choose>
          <xsl:when test='/onlineusers/@loggedUser=@userid'>
            <!-- se sono io -->
            <a class="body_red" href="/profileShow.aspx?userGuid={@userid}">
              <b>
                <xsl:value-of select="@nick"/>
              </b>
            </a>
          </xsl:when>
          <xsl:when test='@buddy=@userid'>
            <!-- se e' nella lista amichetti -->
            <a class="nick" href="/profileShow.aspx?userGuid={@userid}">
              <b>
                <xsl:value-of select="@nick"/>
              </b>
            </a>
          </xsl:when>
          <xsl:otherwise>
            <a class="nick" href="/profileShow.aspx?userGuid={@userid}">
              <xsl:value-of select="@nick"/>
            </a>
          </xsl:otherwise>
        </xsl:choose>
      </td>
    </tr>

  </xsl:if>
</xsl:for-each>

<tr><td class="body_10px" colspan="2" style="padding-top:8px;" align="right">
<a href="/stats/publicSummary.aspx">
...segue</a>
</td></tr>
</table>

</div></div></div></div></div></div></div></div>


</xsl:template>

</xsl:stylesheet>